package com.example.demo.entity;

import lombok.AccessLevel;
import lombok.Data;

import lombok.NoArgsConstructor;
import lombok.RequiredArgsConstructor;

import javax.persistence.Entity;
import javax.persistence.Id;


@Data
@RequiredArgsConstructor //有参构造器
@NoArgsConstructor(access = AccessLevel.PRIVATE, force = true) //jpa实体需要一个无参构造器 属性设为私有，final属性
@Entity  //申明是一个jpa的实体类
public class Ingredient {

    @Id //指定为唯一标识
    private final String id;
    private final String name;
    private final Type type;

    public static enum Type {
        WRAP, PROTEIN, VEGGIES, CHEESE, SAUCE
    }

}
